package com.qf.zhijia;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;


import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.context.annotation.Bean;
import redis.clients.jedis.Jedis;

@SpringBootApplication
@MapperScan("com.qf.zhijia.mapper")
public class ZhijiaApplication {

    public static void main(String[] args) {
        SpringApplication.run(ZhijiaApplication.class, args);
    }

    @Bean
    public Jedis getJedis(){
        return new Jedis("10.31.155.32", 6379);
    }

    /**
     * 将RestTemplate放入到工厂
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
